/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package me.zhy.swing;

import java.awt.Frame;
import java.awt.Panel;
import java.awt.event.MouseAdapter;
import javax.swing.JLabel;

/**
 *
 * @author Moon
 */
public class Test {

    public static void main(String[] args) {
        Frame frame = new Frame();
        frame.setVisible(true);
        Panel panel = new Panel();
        panel.setLayout(null);
        frame.add(panel);
        {
            JLabel label = new JLabel("a");
            DragSupport.startDrag(label);
            label.setSize(label.getMinimumSize());
            panel.add(label);
        }
        {
            JLabel label = new JLabel("b");
            DragSupport.startDrag(label);
            label.setSize(label.getMinimumSize());
            panel.add(label);
        }
    }
}
